package com.jinkeen.xiaxie.workmanager

import android.content.Context
import androidx.work.CoroutineWorker
import androidx.work.Worker
import androidx.work.WorkerParameters
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

/**
 * @description: TODO
 * @author whz
 * @date 2023-06-26 16:44
 * @version 1.0
 */
class UploadWorker(appContext: Context, workerParams: WorkerParameters) :
    CoroutineWorker(appContext, workerParams) {
    override suspend fun doWork(): Result = withContext(Dispatchers.IO) {
        for (i in 0..5) {
            println("i")
        }
        Result.success()
    }
}